package com.ying.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ying.domain.po.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author liujunjie
 * @Description description
 * @Date 2024-09-07 15:29
 **/
@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Update("UPDATE mp_user SET balance=balance- #{money} WHERE id= #{id}")
    void deductBalance(@Param("id") Long id,@Param("money") Integer money);
}
